﻿<location:BasePage x:Class="UI.Web.SL.Demo.SysAdmin.Pages.Sys.MenuLE" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
                   xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
           xmlns:location="clr-namespace:UI.Web.SL.Demo.SysAdmin.Pages"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="580" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot" Loaded="LayoutRoot_Loaded">
        <Grid.ColumnDefinitions>
            <ColumnDefinition x:Name="CDL" Width="200"/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <controls:GridSplitter Grid.Column="1"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
        <ScrollViewer Grid.Row="0" Grid.Column="0" 
                      Width="{Binding ElementName=CDL,Path=Width}" 
                      HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <sdk:TreeView BorderThickness="0" Name="MenuTV" SelectedItemChanged="MenuTV_SelectedItemChanged">
            </sdk:TreeView>
        </ScrollViewer>
        <Grid x:Name="MenuFormG" Grid.Column="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"></ColumnDefinition>
                <ColumnDefinition Width="8"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="32"></RowDefinition>
                <RowDefinition Height="32"></RowDefinition>
                <RowDefinition Height="32"></RowDefinition>
                <RowDefinition Height="32"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="32"></RowDefinition>
            </Grid.RowDefinitions>
            <sdk:Label Target="{Binding ElementName=MenuNameTB}"
                       VerticalAlignment="Center" HorizontalAlignment="Right"
                       ></sdk:Label>
            <TextBox Name="MenuNameTB" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Width="300" 
                            VerticalAlignment="Center" Height="22" Text="{Binding MenuName, Mode=TwoWay                
                    ,NotifyOnValidationError=True,ValidatesOnExceptions=True}">
            </TextBox>

            <sdk:Label Grid.Row="1" Target="{Binding ElementName=MenuOrderTB}"
                       VerticalAlignment="Center" HorizontalAlignment="Right"
                       ></sdk:Label>
            <TextBox Name="MenuOrderTB" Grid.Column="2" Grid.Row="1" 
                     HorizontalAlignment="Left" Width="100" 
                        VerticalAlignment="Center" Height="22"     
                        Text="{Binding OrderNum,Mode=TwoWay
                    ,NotifyOnValidationError=True,ValidatesOnExceptions=True}"></TextBox>


            <sdk:Label Grid.Row="2" Content="菜单路径"
                       VerticalAlignment="Center" HorizontalAlignment="Right"
                       ></sdk:Label>
            <ComboBox x:Name="MenuUrlCB" Height="22" Width="300"
                      SelectedValue="{Binding Url,Mode=TwoWay}"
                    Grid.Column="2" Grid.Row="2" HorizontalAlignment="Left"></ComboBox>

            <TextBlock  Grid.Row="3" Text="父级菜单" VerticalAlignment="Center" HorizontalAlignment="Right"></TextBlock>
            <ComboBox Grid.Column="2" Grid.Row="3" DisplayMemberPath="MenuName" x:Name="TMenuCB"
                      Height="22" Width="100"
                    HorizontalAlignment="Left">
            </ComboBox>

            <sdk:Label Grid.Row="4" Target="{Binding ElementName=HelpTB}"
                       VerticalAlignment="Center" HorizontalAlignment="Right"
                       ></sdk:Label>
            <TextBox Grid.Column="2" Grid.Row="4" x:Name="HelpTB"
                            AcceptsReturn="True"
                            TextWrapping="Wrap"
                            VerticalScrollBarVisibility="Auto"
                        Text="{Binding MenuDes,Mode=TwoWay
                    ,NotifyOnValidationError=True,ValidatesOnExceptions=True}"></TextBox>

            <StackPanel Grid.Column="2" Grid.Row="111"  Orientation="Horizontal">
                <Button x:Name="AddBTN" Width="100" Height="22"  Margin="0 0 10 0" Content="增加" Click="AddBTN_Click"></Button>
                <Button x:Name="EditBTN" Width="100" Height="22" Margin="0 0 10 0"  Content="修改" Click="EditBTN_Click"></Button>
                <Button x:Name="DelBTN" Width="100" Height="22" Margin="0 0 10 0"  Content="删除" Click="DelBTN_Click"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</location:BasePage>
